﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Masterpage/CommonPage.master" AutoEventWireup="true" CodeFile="AddActivityCourse.aspx.cs" Inherits="Activity_AddActivityCourse" %>
<%@ Register TagPrefix="CC" Namespace="Expo.Training.BRule.Controls" Assembly="Expo.Training.BRule" %>
<%@ Register Src="../Controls/CatalogSelector.ascx" TagName="CatalogSelector" TagPrefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="pagenav"><b>您现在的位置：</b>我的管理平台 > <strong><a href="ActivityManagement.aspx">关联课程管理</a></strong> > <asp:Literal ID="ltlActivityTitle" runat="server"></asp:Literal> > 添加关联</div>

<div class="searchpanel">
    <div class="searchpanelheader">
        <div class="searchpaneltitle"><img id="searchPanelImage" name="searchPanelImage" src="<%=ResolveThemeImagePath("searchpanelminus.jpg")%>" width="11" height="11" border="0" alt="" align="absmiddle" onclick="javascript:SwitchSearchPanel('searchPanelContent', this);" />&nbsp;搜索课程</div>
    </div>
    <div class="searchpanelcontent" id="searchPanelContent" name="searchPanelContent">
        <table cellspacing="4">
            <tr style="display:none">
                <td>课程类型：</td>
                <td>
                    <asp:DropDownList ID="ddlType" runat="server">
                        <asp:ListItem Selected="true" Text="所有" Value="0"></asp:ListItem>
                        <asp:ListItem Text="Scorm" Value="1"></asp:ListItem>
                        <asp:ListItem Text="Video" Value="2"></asp:ListItem>
                        <asp:ListItem Text="Web" Value="3"></asp:ListItem>
                        <asp:ListItem Text="NonScorm" Value="4"></asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td>课程目录：</td>
                <td style="width:60%"> 
                      <uc1:CatalogSelector ID="CatalogSelector2" runat="server" />
                      <asp:CheckBox ID="ck_Sub" runat="server" Checked="true" Text="包含子目录" />
                </td>
            </tr>
            <tr>
                <td>课程编号：</td>
                <td><asp:TextBox id="txt_SerialNumber" MaxLength="20" runat="Server" CssClass="txtBox" Width="130" /></td>
                
                <td>课程名称：</td>
                <td colspan="2"><asp:TextBox id="txt_CourseName" MaxLength="100" runat="Server" CssClass="txtBox" Width="130" /></td>
            </tr>
            <tr>  
                <td>创建者：</td>
                <td ><asp:TextBox ID="txt_CreatorName" MaxLength="40" runat="server" CssClass="txtBox" Width="130" /></td>
               
                <td>发布日期：</td>
                <td><asp:TextBox id="txt_CreateDate" MaxLength="40" runat="Server" CssClass="txtBox" Width="130" onclick="JSCalendar(this)"/>&nbsp;<%--<input type="submit" id="Submit1" runat="server" value=" " class="SearchButton" onserverclick="btnSearch_ServerClick" />--%></td>            
            </tr> 
            
            <tr>
                <td>课程筛选：</td>
                <td colspan="2">
                    <label><input runat="server" type="checkbox" id="chk_islastest" />最新课程</label>
                    <label><input runat="server" type="checkbox" id="chk_isrecommend" />推荐课程</label>
                </td>
                <td><input type="submit" id="btnSearch" runat="server" value=" " class="SearchButton" onserverclick="btnSearch_ServerClick" /></td>
            </tr>         
        </table>
    </div>
    <div class="searchpanelfooter"></div>
</div>

<div style="overflow:auto;">
    <!--paneltitle-->
    <div class="paneltitle">课程列表</div>
    <!--paneladd-->
    <div class="paneladd">
        <span style="border-left:5px solid red;padding-left:1px;">最新课程</span>&nbsp;&nbsp;
        <span style="border-left:5px solid green;padding-left:1px;">推荐课程</span>&nbsp;&nbsp;
        <span style="border-left:5px solid orange;padding-left:1px;">最新推荐课程</span>&nbsp;&nbsp;
        <input type="button" class="btn" value="返回" onclick="javascript:window.location.href = 'ActivityCourseManagement.aspx?id=<%= _activityID %>';this.blur();return false;" />
    </div>
</div>

<div class="DG">

	<table cellspacing="0" cellpadding="0" >
    	<tr>
    	  <th style="padding-left:15px;"><input type="checkbox" id="ck_All" name="ck_All" /></th>
       	  <th width="25">序号</th>
          <th>课程名称</th>   
          <th>课程ID</th>
          <th width="50">创建者</th>          
          <th width="55">发布日期</th>
          <th width="30">状态</th>
        </tr>
        <asp:Repeater ID="rpt_CourseList" runat="server">
            <ItemTemplate>
                <tr onmouseover="this.className='tdmover';" onmouseout="this.className='tdmout';">
                    <td style="border-left:5px solid <%# (Eval("IsLastest").ToString() == "1" && Eval("IsRecommend").ToString() == "1") ? "orange" : Eval("IsLastest").ToString() == "1" ? "red" : Eval("IsRecommend").ToString() == "1" ? "green" : "white" %>"><input type="checkbox" id="ck_One" runat="server" value='<%# Eval("CourseID") %>' /></td>
	                <td><%# Eval("RowNumber") %></td>
	                <td><%# Eval("CourseName") %></td>
	                <td><%# Eval("CourseID")%></td>	                
	                <td><%# Eval("UserAccount")%></td>	                
	                <td><%# DisplayDate(Eval("AddTime").ToString())%></td>
	                <td><%# ((Int32)Eval("IsPublic") == 1 ? "公开" : ((Int32)Eval("IsPublic") == 0 ? "非公开" : "隐藏"))%></td>
	                
	            </tr>
	        </ItemTemplate>
	    </asp:Repeater>
	    <tr>
	        <td colspan="8" style="height:30px;">
                <asp:Button ID="btn" runat="server" OnClientClick="javascrpt:return confirm('确定要将活动关联到所选课程吗？');" Text="关联所选课程" CssClass="btn" onclick="btnRelate_Click" />
            </td>
	    </tr>
    </table>    
</div>

<div class="expager">
    <div class="right">
        <CC:ExPager ID="cc_ExPager" runat="server" PageSize="20" OnIndexChanged="PageIndex_Changed" />
    </div>
</div>

<script type="text/javascript" language="javascript">
    jQuery(document).ready(function() {
        jQuery(":checkbox[name='ck_All']").click(function() {
            jQuery("td > :checkbox").attr("checked", this.checked);
            jQuery("th > :checkbox").attr("checked", this.checked);
        });
        jQuery("#ctl00_ContentPlaceHolder1_CatalogSelector1_dv_CatalogHtml").hide();
    });
</script>

</asp:Content>

